package com.zjh.workflow.flowable.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;


@Data
@NoArgsConstructor
@AllArgsConstructor
public class WorkflowProcessInstance {
    private String processInstanceId;  // 流程实例ID
    private String processDefinitionId; // 流程定义ID

    private String processDefinitionKey; // 流程定义Key

    private String processDefinitionName; // 流程定义名称

    private List<String> taskId; // 当前活动的任务Id

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") //返回时间类型
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") //接收时间类型  支持前端字符串日期传入
    private Date startTime;            // 开始时间
    private String startUserId;        // 启动用户ID
    private String starterNickName;        // 启动用户昵称
    private String businessKey;        // 业务Key


    @Override
    public String toString() {
        return "RunningProcessInstance{" +
                "processInstanceId='" + processInstanceId + '\'' +
                ", processDefinitionId='" + processDefinitionId + '\'' +
                ", processDefinitionKey='" + processDefinitionKey + '\'' +
                ", startTime=" + startTime +
                '}';
    }
}